package kr.saeildamil.androidstudy.ch13;

import kr.saeildamil.androidstudy.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView;

public class SeekBarTest extends Activity {
	SeekBar mSeBar;
	TextView mVol;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.seekbartest);

		mSeBar = (SeekBar) findViewById(R.id.ch13_seekbartest_seekbar);
		mVol = (TextView) findViewById(R.id.ch13_volume);

		mSeBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
			@Override
			public void onProgressChanged(SeekBar seekBar, int progress,
					boolean fromUser) {
				mVol.setText("Now Volume : " + progress);
			}
			@Override
			public void onStopTrackingTouch(SeekBar seekBar) {

			}
			@Override
			public void onStartTrackingTouch(SeekBar seekBar) {

			}
		});
	}
}
